import Vue from 'vue';
import Router from 'vue-router';
import Header from '@/components/header/header'; //导航
import Accumulated from '@/views/nav/Accumulated'; //累计数据统计
import Molecular from '@/views/nav/Molecular'; //分子公司授信
import Bill from '@/views/nav/Bill'; //票据
import Bonds from '@/views/nav/Bonds'; //债劵
import Calendar from '@/views/nav/Calendar'; //到期日历
import Financing from '@/views/nav/Financing'; //融资成本
import Fuarantee from '@/views/nav/Fuarantee'; //保函
import Loans from '@/views/nav/Loans'; //流动贷款
import Putin from '@/views/nav/Putin'; //投放量
// import Interior from '@/views/nav/interior';                       //投放量

Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}
export default new Router({
    routes: [{
        path: '/',
        // component: resolve => { require(['@/components/header/header'],resolve)},
        component: Header,
        // redirect:'/index',
        children: [{
                path: 'accumulated',
                name: "molecular",
                component: Accumulated
            },
            {
                path: 'bill',
                name: "bill",
                component: Bill
            },
            {
                path: 'bonds',
                name: "bonds",
                component: Bonds
            },
            {
                path: 'calendar',
                name: "calendar",
                component: Calendar
            },
            {
                path: 'financing',
                name: "financing",
                component: Financing
            },
            {
                path: 'fuarantee',
                name: "fuarantee",
                component: Fuarantee
            },
            {
                path: 'loans',
                name: "loans",
                component: Loans
            },
            {
                path: 'putin',
                name: "putin",
                component: Putin
            },
            {
                path: 'molecular',
                name: 'molecular',
                component: Molecular
            },
            // {
            // path: 'interior',
            // name: 'Interior',
            // component: Interior
            // }
        ]
    }]
})